home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / tclib20.zip / FILEHK.H < prev    next >
C/C++ Source or Header  |  1988-12-03  |  2KB  |  39 lines

  1. /* TCHK 2.0 - Howard Kapustein's Turbo C library       12-3-88 */
  2. /* Copyright (C) 1988, Howard Kapustein.  All rights reserved. */
  3.  
  4. /* filehk.h  -  header file for file routines */
  5.  
  6. #ifndef FILEHK_HEADER
  7. #define FILEHK_HEADER   1
  8.  
  9. #include <howard.h>
  10.  
  11. #ifndef FILEHK_DEFINES
  12. typedef struct filespec {
  13.             char drive;
  14.             char path[81];             /* all strings     */
  15.             char filename[13];         /* are ASCIIZ      */
  16.         };
  17. typedef struct fnameext {
  18.             char filename[9];
  19.             char ext[4];
  20.         };
  21. #define FNAMESIZE       96      /* [d:][80 char path][filename].[ext] */
  22. #define PATHSIZE        100     /* used for making variables to manipulate path stuff */
  23. #define FILEHK_DEFINES  1
  24. #endif
  25.  
  26. /* function prototypes */
  27. int getfname(byte row, byte col, char *returnstr, char *pattern,
  28.              int argn, int argk[],char flags);  /* get a filename.ext */
  29. int set_handles(int handles);               /* set handle count (DOS 3.3) */
  30. int fname_match(char *fname1, char *fname2);/* compare filename with wildcards *,? */
  31. boolean isdir(char *fspec);                 /* is fspec a subdirectory */
  32. struct filespec *parsefilename(char *fspec);/* break fspec into d: path filename ext */
  33. int fncmp(char *fname1, char *fname2);      /* compare filename 1 w/filename 2 */
  34. struct fnameext *parsefnameext(char *filename); /* break filename.ext into filename & ext */
  35. char *expandfilespec(char *filespec, char *dest);   /* expand filespec into full d:\path\filename.ext w/wildcards */
  36. char *getfilespec(char *s);                 /* fix file specs for proper dir searching */
  37.  
  38. #endif              /* FILEHK_HEADER */
  39.